package com.xgll.modules.api.service;

import java.util.List;
import java.util.Map;

import com.xgll.common.utils.Query;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xgll.modules.api.dao.ApiGoodsMapper;
import com.xgll.modules.api.entity.GoodsVo;


@Service
public class ApiGoodsService {
    @Autowired
    private ApiGoodsMapper goodsDao;

    public Integer countKeyWord(Map<String ,Object> map){
        return goodsDao.countKeyWord(map);
    }

    public Integer queryCount(Map<String ,Object> map){
        return goodsDao.queryCount(map);
    }

    public List<Map<String, Object>> homeGoods(Integer cId) {
        return goodsDao.homeGoods(cId);
    }

    public List<Map<String, Object>> searchById(Map<String, Object> map) {
        return goodsDao.searchById(map);
    }

    public List<GoodsVo> searchByKeyWord(Map<String ,Object> map) {
        return goodsDao.searchByKeyWord(map);
    }

    public GoodsVo queryObject(Integer id) {
        return goodsDao.queryObject(id);
    }


    public List<GoodsVo> queryList(Map<String, Object> map) {
        return goodsDao.queryList(map);
    }


    public int queryTotal(Map<String, Object> map) {
        return goodsDao.queryTotal(map);
    }


    public void save(GoodsVo goods) {
        goodsDao.save(goods);
    }


    public void update(GoodsVo goods) {
        goodsDao.update(goods);
    }


    public void delete(Integer id) {
        goodsDao.delete(id);
    }


    public void deleteBatch(Integer[] ids) {
        goodsDao.deleteBatch(ids);
    }

    public List<GoodsVo> queryHotGoodsList(Map<String, Object> map) {
        return goodsDao.queryHotGoodsList(map);
    }

    public List<GoodsVo> queryCatalogProductList(Map<String, Object> map) {
        return goodsDao.queryCatalogProductList(map);
    }
}
